local t = Def.ActorFrame {};

t[#t+1] = Def.ActorFrame {
	Def.ActorFrame { -- Color
		OnCommand=cmd(addy,-40;sleep,2;decelerate,0.5;addy,40;draworder,44);
		OffCommand=cmd(sleep,1;decelerate,0.5;addy,-40;);
		Def.Quad {
			InitCommand=cmd(horizalign,left;vertalign,top;zoomto,SCREEN_WIDTH,5;x,SCREEN_LEFT;y,SCREEN_TOP+35;diffuse,color("#000000");fadebottom,1.0;diffusealpha,0.6;);
		};
		Def.Quad {
			InitCommand=cmd(horizalign,left;vertalign,top;zoomto,SCREEN_WIDTH,35;x,SCREEN_LEFT;y,SCREEN_TOP;diffuse,color("#344396"););
		};
	};
};

t[#t+1] = Def.Quad {
			InitCommand=cmd(horizalign,center;vertalign,top;x,SCREEN_CENTER_X;y,SCREEN_TOP;diffuse,color("#5969C6"););
			OnCommand=cmd(diffusealpha,0;zoomto,0,35;sleep,2.5;decelerate,0.4;zoomto,350,35;diffusealpha,0.6;);
			OffCommand=cmd(decelerate,0.4;zoomto,0,35;);
	};
	
t[#t+1] = LoadFont("_roboto condensed light 24px") .. { 
		  InitCommand=cmd(horizalign,center;vertalign,top;x,SCREEN_CENTER_X;y,SCREEN_TOP+10;diffuse,color("#FFFFFF");zoom,0.75;maxwidth,340);
		  BeginCommand=cmd(playcommand,"Set");
		  OnCommand=cmd(diffusealpha,0;sleep,2.5;zoomx,0;decelerate,0.4;zoomx,0.75;diffusealpha,1;);
		  OffCommand=cmd(decelerate,0.4;diffusealpha,0;zoomx,0;);
          CurrentSongChangedMessageCommand=cmd(playcommand,"Set"); 
          CurrentCourseChangedMessageCommand=cmd(playcommand,"Set"); 
          ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set"); 
          SetCommand=function(self) 
               local song = GAMESTATE:GetCurrentSong(); 
               if song then 
                    self:settext(song:GetDisplayFullTitle()); 
                    self:playcommand("Refresh");
				else
					self:settext("");
					self:playcommand("Refresh"); 
               end 
          end;
};	

t[#t+1] = LoadFont("_roboto condensed light 24px") .. { 
          InitCommand=cmd(player,PLAYER_1;x,THEME:GetMetric(Var "LoadingScreen","PlayerP1OnePlayerOneSideX")-120;y,SCREEN_TOP+17;horizalign,left;);
		  OnCommand=cmd(diffusealpha,0;sleep,2.4;smooth,0.3;diffusealpha,1;);
		  OffCommand=cmd(decelerate,0.3;diffusealpha,0;);
          CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set";playcommand,"Transition";); 
          ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set");
		  TransitionCommand=cmd(finishtweening;diffusealpha,0;addy,-3;smooth,0.2;diffusealpha,1;addy,3;);
          SetCommand=function(self)
			stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
			local song = GAMESTATE:GetCurrentSong();
			if song then 
				if stepsP1 ~= nil then
					local st = stepsP1:GetStepsType();
					local diff = stepsP1:GetDifficulty();
					local cd = GetCustomDifficulty(st, diff, courseType);
					self:diffuse(ColorLightTone(CustomDifficultyToColor(cd)));
					self:settext(THEME:GetString("CustomDifficulty",ToEnumShortString(diff)));
				else
					self:settext("")
				end
			else
				self:settext("")
			end
          end
};

t[#t+1] = LoadFont("_roboto condensed light 24px") .. { 
          InitCommand=cmd(player,PLAYER_2;x,THEME:GetMetric(Var "LoadingScreen","PlayerP2OnePlayerOneSideX")+120;y,SCREEN_TOP+17;horizalign,right;);
		  OnCommand=cmd(diffusealpha,0;sleep,2.4;smooth,0.3;diffusealpha,1;);
		  OffCommand=cmd(decelerate,0.3;diffusealpha,0;);
          CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set";playcommand,"Transition";); 
          ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set");
		  TransitionCommand=cmd(finishtweening;diffusealpha,0;addy,-3;smooth,0.2;diffusealpha,1;addy,3;);
          SetCommand=function(self)
			stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_2)
			local song = GAMESTATE:GetCurrentSong();
			if song then 
				if stepsP2 ~= nil then
					local st = stepsP2:GetStepsType();
					local diff = stepsP2:GetDifficulty();
					local cd = GetCustomDifficulty(st, diff, courseType);
					self:diffuse(ColorLightTone(CustomDifficultyToColor(cd)));
					self:settext(THEME:GetString("CustomDifficulty",ToEnumShortString(diff)));
				else
					self:settext("")
				end
			else
				self:settext("")
			end
          end
};

return t